package spring.cloud.tasks.tasks_manager.zookeeper;

import org.apache.curator.framework.CuratorFramework;
import org.apache.zookeeper.data.Stat;

import java.util.List;

public interface ZooKeeper {

    boolean checkExists(String node);

    String getData(String node);

    List<String> getChildren(String node);

    void create(String node);

    void create(final String node, Object value);

    void update(String node, Object value);

    void delete(String node);

    void deleteRecursive(String node);

    void createIfNotExist(String node, Object value);

    Stat getStat(String node);

    long getMtime(String node);

    long getCtime(String node);

    TransactionalZooKeeper useTransaction();

    CuratorFramework getCuratorFramework();

}
